

rm(list=ls(all=TRUE)) 
load("output/result_cfa_search_Qxx.RData")  # vary Qxx from 1 to 50 or sample name _2014/_agex/_highedu etc. 
post.cov <- which(results.final$post.check == 1)
good.results <- results.final[post.cov,]
(best.id<-which.min(good.results$chisq))
which.max(good.results$cfi)
which.max(good.results$tli)
which.min(good.results$rmsea)
print(good.results[best.id, ])

(best.id<-which.min(good.results$rmsea))
print(good.results[best.id, ])
